package com.flash.javamate.utils;

import java.lang.reflect.Field;

/**
 * 生成mock对象的set方法
 *
 * @author sunyiming
 * @date 2018/9/26
 */
public class GenMockSet {

    public static <T> void gen(Class<T> clazz){
        Field[] declaredFields = clazz.getDeclaredFields();
        for (Field declaredField : declaredFields) {
            String name = declaredField.getName();
            String format = String.format("vo.set%s(%s)", name.substring(0, 1).toUpperCase() + name.substring(1), "111");
            System.out.println(format);
        }
    }

}
